home *** CD-ROM | disk | FTP | other *** search
- unit password;
-
- interface
-
- uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
- Buttons;
-
- type
- TPasswordDlg = class(TForm)
- Label1: TLabel;
- Password: TEdit;
- OKBtn: TButton;
- CancelBtn: TButton;
- Label2: TLabel;
- Password2: TEdit;
- procedure OKBtnClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- PasswordDlg: TPasswordDlg;
-
- implementation
-
- uses demo95fr;
- {$R *.DFM}
-
- procedure TPasswordDlg.OKBtnClick(Sender: TObject);
- begin
- if Password.Text='' then
- begin
- MessageBox(0,'You can''t set current Password','Change Password',MB_ICONINFORMATION);
- ModalResult:=mrNONE;
- Exit;
- end;
-
- If Password.Text<>Password2.Text then
- begin
- MessageBox(0,'Incorrect Passwords','Change Password',MB_ICONSTOP);
- ModalResult:=mrNONE;
- Exit;
- end;
-
- FormWin95.MXSession1.ChangePassword:= Password.Text;
- If FormWin95.MXSession1.ErrorNum = 0 Then
- MessageBox(0,'Password Changed!!!', 'Mail eXtension', 64)
- Else
- MessageBox(0,'Unable to Set Password', 'Change Password',MB_ICONQUESTION);
- end;
-
- end.
-
-